<template>
  <footer class="footer">
    <div class="bottom">
      <span class="word1">Subscribe to Newsletter</span>
      <h4 class="word2">Enter your email address to sign up for our newsletter subscription!</h4>
      <el-form :label-position="labelPosition" label-width="80px" :model="formLabelAlign">
        <el-form-item label="">
          <el-input class="input1" v-model="formLabelAlign.name" placeholder="Email address"></el-input>
        </el-form-item>
      </el-form>
      <el-button type="primary" class="button1" @click="sendEmail">SEND</el-button>
    </div>
  </footer>
</template>

<script setup>
import { ref } from 'vue';

const formLabelAlign = ref({
  name: '',
  region: '',
  type: ''
});

// 示例函数，实现发送邮件功能
const sendEmail = () => {
  console.log("Sending email to:", formLabelAlign.value.name);
  // 这里可以添加发送邮件的API调用
};
</script>

<style scoped>
.footer {
  height: 370px;
  background-color: rgba(151, 171, 215, 0.12);
  padding-top: 60px;
  text-align: center;
}
.word1 {
  font-size: 45px;
  font-weight: normal;
}
.word2 {
  font-size: 15px;
  font-weight: lighter;
  padding-top: 10px;
}
.input1 {
  width: 40%; /* 修改宽度以更好地适应不同屏幕尺寸 */
  height: 40px;
  margin-top: 15px;
  margin-left: auto; /* 自动外边距实现居中 */
  margin-right: auto; /* 自动外边距实现居中 */
}
.button1 {
  height: 45px;
  width: 110px;
  background-color: #0062cc;
}
</style>
